From: Florian Müllner Date: Sun, 3 Aug 2025 20:32:40 +0000 (+0200) Subject: brightnessManager: Fix stepping up/down via shortcuts X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~112^2^2~19 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=494e3c74df02c373e3b099cc38d2576e1c1686b4;p=gnome-shell.git brightnessManager: Fix stepping up/down via shortcuts The `BrightnessScale.value` property was originally called `brightness`, and the methods used for keyboard shortcuts somehow missed the name change. As a result, the methods try to set the brightness to `undefined`, which is out of range and thus fails. Use the correct property name to fix the shortcuts. Closes: https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/8570 Part-of: --- diff --git a/js/misc/brightnessManager.js b/js/misc/brightnessManager.js index 406c9f2dd..4ca1752d0 100644 --- a/js/misc/brightnessManager.js +++ b/js/misc/brightnessManager.js @@ -306,15 +306,15 @@ export const BrightnessScale = GObject.registerClass({ } stepUp() { - this._setValue(Math.min(1.0, this._brightness + SCALE_VALUE_STEP)); + this._setValue(Math.min(1.0, this._value + SCALE_VALUE_STEP)); } stepDown() { - this._setValue(Math.max(0.0, this._brightness - SCALE_VALUE_STEP)); + this._setValue(Math.max(0.0, this._value - SCALE_VALUE_STEP)); } cycleUp() { - if (Math.abs(1.0 - this._brightness) < SCALE_VALUE_CHANGE_EPSILON) + if (Math.abs(1.0 - this._value) < SCALE_VALUE_CHANGE_EPSILON) this._setValue(0.0); else this.stepUp();